/*
 * @Date: 2023-03-20 19:56:04
 * @LastEditors: Chuying
 * @LastEditTime: 2023-03-24 10:58:53
 * @Description:
 */
import { PartialType } from '@nestjs/mapped-types';
import { CreateCategoryDto } from './create-category.dto';
import { IsNotEmpty, IsString, Length } from 'class-validator';
export class UpdateCategoryDto extends PartialType(CreateCategoryDto) {
  @IsNotEmpty({
    message: '分类值不能为空',
  })
  @IsString()
  category: string;

  @IsNotEmpty({
    message: '分类描述不能为空',
  })
  @Length(0, 6, {
    message: '字符长度不超过6字符',
  })
  @IsString()
  name: string;
}
